#include <iostream>
#include <openssl/sha.h>
#include <string>
#include <fstream>
using namespace std;

int main()
{
    std::string input = "tvasdgvkkuytrewavbnmjuyresxcvwvdsvsdvnkuytresxdtyuikjhgfdszjuytrdxcvbnytrbnyte";
    unsigned char test[1024];
    SHA512_CTX ctx;
    SHA512_Init(&ctx);
    SHA512_Update(&ctx,input.c_str(),input.length());
    SHA512_Final(test,&ctx);
    fstream fs;
    fs.open("./tout",ios::in|ios::out|ios::binary|ios::trunc);
    fs << test;
    fs.close();
}